package cn.janescott.eurekaserver.web;

import org.springframework.cloud.netflix.eureka.EurekaClientConfigBean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author scott
 * @date 2019/1/3
 */
@RestController
@RequestMapping("/query")
public class QueryController {

    @Resource
    private EurekaClientConfigBean clientConfigBean;

    @GetMapping("/getEurekaServerUrl")
    public Object getEurekaServerUrl() {
        return clientConfigBean.getServiceUrl();
    }
}
